<?php echo $header;echo $sidebar ?>		

		<link href="<?php echo $this->config->base_url();?>assets/admin/admin_css/chart/styles.css" rel="stylesheet" />

		
		<style type="text/css">
		.settings-block {
		width: 170px;
		height: 110px;
		float: left;
		margin: 5px;
		cursor: pointer;
		background: url('<?php echo $this->config->base_url(); ?>assets/admin/images/icon/icn_settings.png') 0 0 no-repeat;
		}
		.settings-block a {
		text-decoration: none;
		}
		.settings-block > div {
		color: #000000;
		font-size: 13px;
		margin: 5px 10px;
		}
		.settings-block.with-notifications_menu_item {
		background-position: -1700px 0;
		}
		.settings-block.with-notifications_menu_item:hover {
		background-position: -1700px -110px;
		}
		.settings-block.with-mail_list_menu_item:hover {
		background-position: -5780px -110px;
		}
		.settings-block.with-mail_list_menu_item {
		background-position: -5780px 0;
		}
		.settings-block h6 {
		color: #000000;
		font-weight: bold;
		font-size: 13px;
		margin: 5px 10px;
		padding: 0;
		}
		.with-mail_template_menu_item{
			background-position:-170px 0;
		}
		</style>
		
		<script src="<?php echo $this->config->base_url();?>assets/admin/admin_js/chart/jquery-1.9.1.min.js"></script>
		<script src="<?php echo $this->config->base_url();?>assets/admin/admin_js/chart/knockout-2.2.1.js"></script>
		<script src="<?php echo $this->config->base_url();?>assets/admin/admin_js/chart/globalize.min.js"></script>
		<?php if($opened_email){ ?>
		<script src="<?php echo $this->config->base_url();?>assets/admin/admin_js/chart/dx.chartjs.js"></script>
		<script type="text/javascript">
			$(function ()  {

				var dataSource = <?php echo '[
					    { state: "Tue", subscribed: 0.00, unsubscribed: 0.00, unconfirmed: 0.00, 
						  open: '.(array_key_exists('Tue', $opened_email['open'])?$opened_email['open']['Tue']:0.00).', 
						  send: '.(array_key_exists('Tue', $opened_email['send'])?$opened_email['send']['Tue']:0.00).'},
					    { state: "Wed", subscribed: 0.00, unsubscribed: 0.00, unconfirmed: 0.00, 
						  open: '.(array_key_exists('Wed', $opened_email['open'])?$opened_email['open']['Wed']:0.00).', 
						  send: '.(array_key_exists('Wed', $opened_email['send'])?$opened_email['send']['Wed']:0.00).'},
					    { state: "Thu", subscribed: 0.00, unsubscribed: 0.00, unconfirmed: 0.00, 
						  open: '.(array_key_exists('Thu', $opened_email['open'])?$opened_email['open']['Thu']:0.00).', 
						  send: '.(array_key_exists('Thu', $opened_email['send'])?$opened_email['send']['Thu']:0.00).'},
					    { state: "Fri", subscribed: 0.00, unsubscribed: 0.00, unconfirmed: 0.00, 
						  open: '.(array_key_exists('Fri', $opened_email['open'])?$opened_email['open']['Fri']:0.00).', 
						  send: '.(array_key_exists('Fri', $opened_email['send'])?$opened_email['send']['Fri']:0.00).'},
					    { state: "Sat", subscribed: 0.00, unsubscribed: 0.00, unconfirmed: 0.00, 
						  open: '.(array_key_exists('Sat', $opened_email['open'])?$opened_email['open']['Sat']:0.00).', 
						  send: '.(array_key_exists('Sat', $opened_email['send'])?$opened_email['send']['Sat']:0.00).'},
					    { state: "Sun", subscribed: 0.00, unsubscribed: 0.00, unconfirmed: 0.00, 
						  open: '.(array_key_exists('Sun', $opened_email['open'])?$opened_email['open']['Sun']:0.00).', 
						  send: '.(array_key_exists('Sun', $opened_email['send'])?$opened_email['send']['Sun']:0.00).'},
					    { state: "Mon", subscribed: 0.00, unsubscribed: 0.00, unconfirmed: 0.00, 
						  open: '.(array_key_exists('Mon', $opened_email['open'])?$opened_email['open']['Mon']:0.00).', 
						  send: '.(array_key_exists('Mon', $opened_email['send'])?$opened_email['send']['Mon']:0.00).'}
					];';?>	

					$("#chartContainer").dxChart({
					    dataSource: dataSource,
					    commonSeriesSettings: {
					        argumentField: "state",
					        type: "stackedBar"
					    },
					    series: [
					        { valueField: "subscribed", name: "Subscribed", stack: "male" },
					        { valueField: "unsubscribed", name: "Unsubscribed", stack: "male" },
					        { valueField: "unconfirmed", name: "Unconfirmed Subscr's", stack: "male" },
					        { valueField: "open", name: "Opened", stack: "female" },
					        { valueField: "send", name: "Sent", stack: "female" }
					    ],
					    legend: {},
					    valueAxis: {},
					    title: "Subscribers Activity for the Last 7 Days",
					    tooltip: {enabled: true}
					});

			});
			  
		</script>
		<?php } ?>
				

		<div class="span10 content">

			<?php echo $hugemenu ?>

			<h1>Email Marketing</h1>

			<?php if($this->session->flashdata('message')) {?>
			<div class="alert alert-success">
				<?php echo $this->session->flashdata('message') ?>
			</div>
			<?php  }?>

			<div>
				<table cellspacing="0" cellpadding="0" border="0" width="100%" summary="Employee Pay Sheet" id="box-table-a">

    			<tbody>

					<div class="settings-block with-notifications_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/template')?>';">
					
						<a href="<?=site_url('email_marketing/template')?>"><h6>Newsletters</h6></a>
					
						<div></div>
					
					</div>
					
					<div class="settings-block with-notifications_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/template')?>';">
					
						<a href="<?=site_url('email_marketing/template')?>"><h6>Autoresponders</h6></a>
					
						<div></div>
					
					</div>
					
					
					<div class="settings-block with-notifications_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/template')?>';">
					
						<a href="<?=site_url('email_marketing/template')?>"><h6>Attachment</h6></a>
					
						<div></div>
					
					</div>
					
					<div class="settings-block with-notifications_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/template')?>';">
					
						<a href="<?=site_url('email_marketing/template')?>"><h6>Template</h6></a>
					
						<div></div>
					
					</div>
					
					
					<div class="settings-block with-notifications_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/template')?>';">
					
						<a href="<?=site_url('email_marketing/template')?>"><h6>HTML Email Designer</h6></a>
					
						<div></div>
					
					</div>
					
					
					 <div class="settings-block with-mail_list_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/mailing_list')?>';">
					
						<a href="<?=site_url('email_marketing/mailing_list')?>"><h6>Mailing lists</h6></a>
					
						<div>Manage Mailing List</div>
					
					</div>
					
					 <div class="settings-block with-mail_list_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/subscription')?>';">
					
						<a href="<?=site_url('email_marketing/subscription')?>"><h6>Subscribers</h6></a>
					
						<div>Manage subscribers</div>
					
					</div>
					
					<div class="settings-block with-mail_template_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/template')?>';">
					
						<a href="<?=site_url('email_marketing/template')?>"><h6>Forms</h6></a>
					
						<div></div>
					
					</div>
					
					<div class="settings-block with-mail_template_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/settings')?>';">
					
						<a href="<?=site_url('email_marketing/settings')?>"><h6>Setting</h6></a>
					
						<div></div>
					
					</div>
					
					<div class="settings-block with-mail_template_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/template')?>';">
					
						<a href="<?=site_url('email_marketing/template')?>"><h6>Statistics</h6></a>
					
						<div></div>
					
					</div>
					
					<div class="settings-block with-notifications_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/template')?>';">
					
						<a href="<?=site_url('email_marketing/template')?>"><h6>Email notifications</h6></a>
					
						<div>SMTP server, text of notifications, subscriptions</div>
					
					</div>
					
					
					<div class="settings-block with-mail_template_menu_item" onclick="javascript: location.href='<?=site_url('email_marketing/template')?>';">
					
						<a href="<?=site_url('email_marketing/template')?>"><h6>Email Template</h6></a>
					
						<div>Email Template Manager</div>
					
					</div>
					           
					
					</tbody>
					
					</table>
					
					<div class="content">
						
					 	<div class="long-title"><h3></h3></div>
					 	
					    <div id="chartContainer" style="width: 100%; height: auto;margin-left:-45px;"></div>
					    <div class="credits"></div>
					</div>
			</div>
		</div><!--/content-->
<?php echo $footer ?>
<script>
$(document).ready( function () {
    $(".collapse").collapse()({
      show: false
      });
});
</script>